@var head = {
	<link href="${request.contextPath}/lib/ztree/zTreeStyle.css" rel="stylesheet" type="text/css" />
	<title>权限管理</title>
@};
@var content = {
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 权限管理 <span class="c-gray en">&gt;</span> 权限管理
		<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pos-a" style="width:170px;height:100%; border-right:1px solid #e5e5e5; background-color:#f5f5f5">
		<ul id="actionTree" class="ztree">
			
		</ul>
	</div>
	<div class="pd-20" style="margin-left:170px;">
		<div class="text-c">
			<form action="${request.contextPath}/action/search.html" method="post">
				<input type="text" class="input-text" style="width:250px" placeholder="输入权限名称" id="" name="actionName" value="${actionName!''}">
				<input type="text" class="input-text" style="width:250px" placeholder="输入备注" id="" name="remark" value="${remark!''}">
				<button type="submit" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜权限</button>
			</form>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20"> 
			<span class="l">
				<a href="javascript:;" onclick="dels('${request.contextPath}/action/batchdelete.html')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
				<a href="javascript:;" onclick="layer_show('添加权限','${request.contextPath}/action/create.html','800','500')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加权限</a>
			</span> 
			<span class="r">
				共有数据：<strong>${total}</strong> 条
			</span> 
		</div>
		<table class="table table-border table-bordered table-bg">
			<thead>
				<tr>
					<th scope="col" colspan="9">权限列表</th>
				</tr>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th width="70">名称</th>
					<th width="150">备注</th>
					<th width="100">加入时间</th>
					<th width="50">是否已启用</th>
					<th width="150">操作</th>
				</tr>
			</thead>
			<tbody id="dataContent">
				
			</tbody>
		</table>
		<div id="pager" style="padding-top:5px;float:right"></div>
	</div>
	<footer class="footer">
   		<p>本后台系统由<a href="http://www.h-ui.net/" target="_blank" title="H-ui前端框架">H-ui前端框架</a>提供前端技术支持</p>
	</footer>
@};
@var js = {
	<script type="text/javascript" src="${request.contextPath}/lib/ztree/jquery.ztree.all-3.5.min.js"></script> 
	<script>
		var zNodes = [
           	{id : '0', pId : 0, name : '权限管理', isParent : true, open : true}
        ];
		var treeSetting = {
			view : {
				dblClickExpand : false
			},
			async : {
				enable : true,
				url : "${request.contextPath}/action/childs.html?t=" + Math.random(),
				autoParam : ["id=id"],
				dataFilter: ajaxDataFilter
			},
			callback : {
				onClick : actionTreeClick
			}
		};
		$(document).ready(function () {
			pager('${request.contextPath}/action/list.html', {actionName : "${actionName!''}", remark : "${remark!''}"}, ${total}, 8);
			var actionTree = $.fn.zTree.init($("#actionTree"), treeSetting, zNodes);
			expandFirstNode(actionTree);
		});
		function expandFirstNode(actionTree){
			var nodes = actionTree.getNodes();  
			actionTree.expandNode(nodes[0], true);
		}
		function actionTreeClick(event, treeId, treeNode) {
			pager('${request.contextPath}/action/list.html', {parentId : treeNode.id, actionName : "${actionName!''}", remark : "${remark!''}"}, ${total}, 8);
		}
		function ajaxDataFilter(treeId, parentNode, responseData) {
		    return responseData.data;
		}
	</script>
@};
@include("/layout/layout.html",{head:head,content:content,js:js}){}